package com.example.debugproject;

import android.os.Bundle;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class DeBugActivity extends AppCompatActivity {

    private String logTag = DeBugActivity.class.getSimpleName();

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.debug_activity_layout);

        //循环体
        for (int i = 0; i < 10; i++) {
          //获取当前i的值
            int selector = i;
            //打log查看当前i的值（此步多余，实际开发请忽略）
            Log.e(logTag,"for当前的i的值：" + i);
            //调用方法
            stepNext(i);
        }
    }

    private void stepNext(int i) {
        //输入stepNext中接收到的i的值
        Log.i(logTag,"stepNext当前的i的值："+i);

    }
}
